import {createPinia} from 'pinia'
import {store} from '../index.js'

export const useCountStore = defineStore('count',{
	state:()=>{
		return {
			count:0
		}
	},
	actions:{
		increment(){
			this.count++
		}
	},
	presist:true//配置持久化
})

// 如何解决在组件外使用
export function useCountStoreHook(){
	return useCountStore(store)
}